import 'dart:convert';

class VersionModel {
  int? agent;
  int? applicationType;
  int? audit;
  String? auditOperator;
  int? auditTime;
  String? brandCode;
  int? createTime;
  String? desc;
  int? id;
  String? name;
  String? operator;
  String? rejectOperator;
  int? rejectTime;
  int? size;
  int? status;
  int? upgrade;
  String? version;

  VersionModel(
      {this.agent,
        this.applicationType,
        this.audit,
        this.auditOperator,
        this.auditTime,
        this.brandCode,
        this.createTime,
        this.desc,
        this.id,
        this.name,
        this.operator,
        this.rejectOperator,
        this.rejectTime,
        this.size,
        this.status,
        this.upgrade,
        this.version});

  VersionModel.fromJson(Map<String, dynamic> json) {
    agent = json['agent'];
    applicationType = json['application_type'];
    audit = json['audit'];
    auditOperator = json['audit_operator'];
    auditTime = json['audit_time'];
    brandCode = json['brand_code'];
    createTime = json['create_time'];
    desc = json['desc'];
    id = json['id'];
    name = json['name'];
    operator = json['operator'];
    rejectOperator = json['reject_operator'];
    rejectTime = json['reject_time'];
    size = json['size'];
    status = json['status'];
    upgrade = json['upgrade'];
    version = json['version'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['agent'] = agent;
    data['application_type'] = applicationType;
    data['audit'] = audit;
    data['audit_operator'] = auditOperator;
    data['audit_time'] = auditTime;
    data['brand_code'] = brandCode;
    data['create_time'] = createTime;
    data['desc'] = desc;
    data['id'] = id;
    data['name'] = name;
    data['operator'] = operator;
    data['reject_operator'] = rejectOperator;
    data['reject_time'] = rejectTime;
    data['size'] = size;
    data['status'] = status;
    data['upgrade'] = upgrade;
    data['version'] = version;
    return data;
  }
}

List<VersionModel> versionListFromJson(String str) =>
    List<VersionModel>.from(
        json.decode(str).map((x) => VersionModel.fromJson(x)));

String versionListToJson(List<VersionModel> data) =>
    json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
